﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Bundled.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Bundled.Pages.Products.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 <h3>Products</h3>
    <asp:ListView ID="productList" runat="server" OnItemCommand="productList_ItemCommand">
       <LayoutTemplate>
           <table class="productPage">
            <tr id="itemPlaceholder" runat="server">
            </tr>
          </table>
           </br>
          <div class="prodDataPager">
                <asp:DataPager ID="DataPager1" runat="server" PageSize="4">
                    <Fields>
                <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowLastPageButton="true"
                FirstPageText="First" LastPageText="Last" NextPageText=" &gt; " PreviousPageText=" &lt; "/>
                    </Fields>
                </asp:DataPager>
           </div>
       </LayoutTemplate>
        <ItemTemplate>
            <td class="prodRow">
            <asp:HyperLink ID="prodImage" runat="server" Text='Detail'
           NavigateUrl='<%#"Details.aspx?ProductID=" + 
              Eval("Product_ID") %>' ImageUrl='<%#Eval("Product_Image") %>' ImageHeight="250" ImageWidth="250"/>
            <div class="bold">Name: </div>  <asp:Label ID="productName" runat="Server" Text='<%#Eval("Product_Name") %>' />
            <div class="bold">Price: </div>$<asp:Label ID="productPrice" runat="Server" Text='<%#Eval("Product_Price") %>' />
            <div class="bold">Manufacturer: </div><asp:Label ID="productBrand" runat="Server" Text='<%#Eval("Brand") %>' />
                <div></div>
                <br></br>
            <asp:LinkButton ID="addCart" runat="server" Text="Add to Cart" CommandName="AddCart" CommandArgument='<%#Eval("Product_ID") %>' CssClass="prodButton"/>
            <asp:HyperLink ID="prodDetail" runat="server"
           Text='Detail'
           NavigateUrl='<%#"Details.aspx?ProductID=" + 
              Eval("Product_ID") %>' CssClass="prodButton"/>
            </td>
        </ItemTemplate>
    </asp:ListView>

</asp:Content>
